/*public class Test {
    public static void main(String[] args) {

    }
    //输出一个整数的每一位，如：123的每一位是3，2，1
    public static void print(int n) {
        while (n != 0){
            System.out.print(n % 10 + " ");
            n /= 10;
        }
    }
    public static void main1(String[] args) {
        print(123);
    }
}*/
/*class Person {
    public String name = "李四我";   // 字段
    public int age = 10;
}
 public class Test {
    public static void main(String[] args) {
        Person person = new Person();
        //person.name;
        int ret = person.age;
        System.out.println();
        System.out.println(ret);
        System.out.println(person.name.length());
    }
}*/
//package NowCoder;

    /*class Test1 {
        public static void hello() {
            System.out.println("hello");
        }
    }
    //public class MyApplication {
    public class Test {
        public static void main(String[] args) {
            // TODO Auto-generated method stub
            //Test1 test=null;
            Test1 test=new Test1();
            test.hello();
        }
    //}
    public static void main1(String[] args) {

        String s;

        //System.out.println("s="+s);

    }
}*/


public class Test {
    public static void main(String[] args) {
        int[] array1 = {1, 2, 3, 4};
        int[] array2 = {5, 2, 3, 4};
        for (int i = 0; i < array1.length; i++) {
            int ret = i;
        }
        for (int j = 0; j < array1.length; j++) {
            int tmp = j;
        }


    public static void main1(String[] args) {
        int[] array = {1,2,3,4};
        int left = 0;
        int right = array.length-1;
        while (left < right){
            while (left < right && left % 2 == 0){
                left++;
            }
            while (right > left  && right % 2 != 0){
                right--;
            }
            int tmp = array[left];
            array[left] = array[right];
            array[right] = tmp;
        }
        System.out.println(tmp);
    }

}






    //private String name = "Person";
   // public String name = "Person";

    //int age=0;
    //public static void main(String[] args) {
    private static int x = 100;// 2
    public static void main1(String args[]) {// 3
       Test hsl = new Test();// 4
       // hsl.x++;// 5
        //HasStatic hs2 = new HasStatic();// 6
        //hs2.x++;// 7
        hsl = new Test();// 8
        hsl.x++;// 9
        //HasStatic.x--;// 10
        System.out.println(" x=" + x);// 11
    }

    }



